<template>
  <div class="td-pay-success">
    <i class="icon font_family icon-td-success"></i>

    <h2>支付成功</h2>
    <p>支付金额：
      <span>￥{{total}}</span>
    </p>

    <ul>
      <li>
        <el-button size="medium" @click="$router.push({path:url1})">{{text1}}</el-button>
      </li>
      <li>
        <el-button size="medium" @click="$router.push({path:url2})">{{text2}}</el-button>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "TianDingPaySuccessComponent",
  data() {
    return {
      type: 0,
      text1: "",
      text2: "",
      url1: "",
      url2: "",
      total: "0.00"
    };
  },
  mounted() {
    this.type = this.$route.params.type;
    this.total = this.$route.params.total;
    if (this.type === 0) {
      this.text1 = "继续下单";
      this.text2 = "我的订单";
      this.url1 = "/tdPatient/tdPatientDelection";
      this.url2 = "/tdPatient/tdOrder";
    } else {
      this.text1 = "继续预约";
      this.text2 = "预约记录";
      this.url1 = "/tdPatient/tdPatientReservation";
      this.url2 = "/tdPatient/tdAppointmentRecord";
    }
  }
};
</script>
